package com.ohs.service.impl;

import com.ohs.mapper.before.DistrictMapper;
import com.ohs.pojo.District;
import com.ohs.service.DistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DistrictServiceImpl implements DistrictService {
    @Autowired(required = false)
    private DistrictMapper districtMapper;


    @Override
    public List<District> findCityByParent(String parent) {
        List<District> districts= districtMapper.findAllProvinces(parent);
        return districts;
    }

    @Override
    public List<District> findAllProvincesByParent(String parent) {
        List<District> districts= districtMapper.findAllProvinces(parent);
        return districts;
    }

    @Override
    public List<District> findCountyByParent(String parent) {
        List<District> districts= districtMapper.findAllProvinces(parent);
        return districts;
    }
}
